Update fontsource integration according with the documentation#483
Open
Update fontsource integration according with the documentation#483
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates Fontsource integration to use the recommended @fontsource-utils SCSS mixins and adds the corresponding dependency, adjusting both documentation comments and Poppins font-face declarations accordingly. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The SCSS
@usepaths reference../../../node_modules/...; if your build tooling supports it, prefer using package-based imports (e.g.@use '@fontsource-utils/scss/src/mixins') to avoid brittle relative paths that may break if the directory structure changes. - You
@usethefontsourcemixins both in the comment examples and at the top of the file; consider centralizing the import once and referencing it consistently in examples to reduce duplication and potential divergence over time.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The SCSS `@use` paths reference `../../../node_modules/...`; if your build tooling supports it, prefer using package-based imports (e.g. `@use '@fontsource-utils/scss/src/mixins'`) to avoid brittle relative paths that may break if the directory structure changes.
- You `@use` the `fontsource` mixins both in the comment examples and at the top of the file; consider centralizing the import once and referencing it consistently in examples to reduce duplication and potential divergence over time.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Contributor
|
à présenter en réunion équipe theme dev du 20.04. je l'ai ajouté à l'ODJ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mise à jour de l'intégration de font source via l'utilitaire recommandé par la documentation. Font source a évolué entre temps.
Summary by Sourcery
Update font loading to use the recommended @fontsource-utils SCSS mixins for Poppins and adjust installation instructions accordingly.
Enhancements:
Build:
Note
Medium Risk
Moderate risk because it changes how
@font-facerules are generated for Poppins, which can affect font loading, bundle output, and styling/CLS, though the change is localized to build-time SCSS.Overview
Updates Fontsource integration to follow current docs by adding
@fontsource-utils/scssand switching_fonts.scssto generate font faces viafontsource.faces($metadata: ... )instead of calling the font package’sfacesmixin directly.Includes lockfile updates and refreshed inline usage examples for both classic and variable fonts to match the new approach.
Reviewed by Cursor Bugbot for commit 25af7fa. Bugbot is set up for automated code reviews on this repo. Configure here.